#Stop
'*******************************************************************
'*   ETF Stop  (ETFStop.txt)
'*     by Jeremy Williams
'*	   April 14,2008
'*
'*	Adapted from Technical Analysis of Stocks and Commodities
'*     June 2008
'*
'*  Summary: 
'*
'*  This stop generates exit signals when the a bar closes above its 
'*  high from two bars prior. It is described in Gerald
'*  Gardner's article "Profit With ETF's" from the June 2008 edition
'*  of Technical Analysis of Stocks and Commodities. For more 
'*  information see Trader's Tips in the June 2008 issue of Technical 
'*  Analysis of Stocks and Commodities.
'*
'*  Parameters:
'*
'*  Period -  Specifies the number of periods used in the calculation 
'*
'******************************************************************** 

#Param "Periods",2

' If exit conditions are met, fire exit signal
If signal = longsignal And c>h[periods] Then
	Signal = ExitSignal
Else if signal = shortsignal and c<low[periods] then 
	Signal = ExitSignal
End if